# Replication data & code for "Government Spending and Voting Behavior"

Anselm Hager / Hanno Hilbig, June 2023

Below, we provide additional information regarding the replication code and data.

We provide an overview of all tables and figures and the .R files that generate these are listed in the replication_overview.xlsx file.

For additional questions, please contact hhilbig@princeton.edu

## Main results

The replication code for the main RD results for federal, state and municipal elections can be found in the rd_federal.R, rd_state.R and rd_municipal.R files. These files then save the results as .rds files (rdd_*_results.rds), which are then loaded in the .R scripts that produce the figures and tables that present the main RD results. This concerns, for example, table 3, which contains the main results -- the corresponding .R file is tab_3.R. The purpose of this is to avoid re-running very similar or identical analyses in multiple files.

Similarly, we also save the randomization inference p-values as a separate file (ri_pvals.rds), which is loaded in from tab_A3.R, which produces table A.3. The randomization inference p-values are produced in the file fig_4_A11.R.

## SOEP data (German Socio-Economic Panel)

- The SOEP data is used for the results presented in figures 5 and 6, as well as table A.13.
    - We note that we cannot provide the SOEP data files, since they are proprietary
    - For figure A.13, we provide code that cleans the SOEP data and allows researchers to reproduce our results if they have access to the SOEP data. These results can be reproduced using the main SOEP data, i.e. they do not require additional access to more sensitive variables, such as information on the county or municipality where respondents reside.
    - For figures 5 and 6, we provide saved regression results as an .rds file, that both tables can be reproduced. We note that the analyses that produce figures 5 and 6 require information on the municipality that SOEP respondents reside in. We obtained this information through on-site data access in Berlin at the DIW. To replicate these analyses, on-site access is likely required.
    - For information on SOEP data access, see https://www.diw.de/en/diw_01.c.601584.en/data_access.html

## Civey

- We provide Civey survey data without unique user IDs or municipality codes. We further add a small amount of Poisson noise to the pre-census population that is part of the data set, such that it cannot be identified in which municipality respondents reside. Since we added noise to the pre-census population, which is the running variable in the RD design, the RD estimate (bottom of figure A.20) will be slightly different from the one in the paper. Finally, county codes are uninformative, but allow for the estimation of the model that includes county fixed effects.

